package com.meilai.project.constant;

import lombok.Getter;

@Getter
public enum BFModeTypeEnum {
    NORMAL(0, "正常"),
    HANG_UP(1, "挂起"),
    CANCEL(2, "作废");

    private Integer id;
    private String name;


    BFModeTypeEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public static BFModeTypeEnum getEnumById(Integer id) {
        for (BFModeTypeEnum cur : BFModeTypeEnum.values()) {
            if (cur.getId().equals(id)) {
                return cur;
            }
        }
        return null;
    }
}
